const state = {
    vistors: 0
}

const mutations = {
    add(state) {
        window.console.log('vistor中执行add')
        state.vistors++
    },
    reduce(state) {
        window.console.log('vistor中执行remove')
        state.vistors--
    }

}
const actions = {
    add: ({ commit }) => {
        commit('add')
    },
    reduce: ({ commit }) => {
        commit('reduce')
    }
}
export default {
    namespaced: true,
    state,
    mutations,
    actions
}